home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / viewers / grasp / commands.man < prev    next >
Text File  |  1995-02-13  |  13KB  |  333 lines

  1.  
  2.  
  3.  
  4.     GL COMMANDS                                               03.09.92
  5.  
  6.  
  7.  
  8.     The following GRASP commands have been implemented in GL 2.1. This
  9.     is a subset of those available in the real thing, chosen because
  10.     they applied to the files that I have, and fit fairly well into
  11.     the goal of converting files to play back efficiently.
  12.  
  13.     I added a few commands which you won't find in the MS-DOS format,
  14.     because they were useful in converting files. They are marked with
  15.     an A.
  16.  
  17.     Positioning in an Amiga GL file is relative to the top-left corner
  18.     of the screen. When converting, it is often necessary to change
  19.     the coordinates in commands to match this, as the MS-DOS default
  20.     appears to be relative to the bottom-left of the screen.
  21.  
  22.     Optional parameters are delimited by square brackets. Some MS-DOS
  23.     versions of these commands have other optional parameters
  24.     following those listed. These are ignored by GL.
  25.  
  26.  
  27.     BOX X0,Y0,X1,Y1,[WIDTH]
  28.  
  29.         Draws a box from X0,Y0 to X1,Y1, with a border WIDTH pixels
  30.         wide. The default WIDTH is 1.
  31.  
  32.     CFADE FADE,X,Y,BUFFER,[SPEED],[DELAY]
  33.  
  34.         Fades a clip to the screen. See FADES below for a list of the
  35.         supported fades. The clip will be positioned at X,Y on the
  36.         screen. The BUFFER is the clip number to fade, and is the
  37.         same as the BUFFER in the CLOAD command.
  38.  
  39.         The SPEED parameter is ignored. The DELAY parameter indicates
  40.         a delay, in 100ths of a second, before the player should
  41.         continue with the next command.
  42.  
  43.     CFREE NUM1,[NUM2],[NUM3],...
  44.  
  45.         Free 1 or more clip buffers. The memory allocated for the
  46.         specified buffers will be returned to the system. It's ok if
  47.         a buffer hasn't actually been loaded before calling this
  48.         command - that buffer will just be ignored.
  49.  
  50.         Note that if you will be loading another clip into one of
  51.         these buffers, and that clip is the same size or smaller than
  52.         the current contents, then there isn't much point in calling
  53.         CFREE. The CLOAD command will detect that the buffer space
  54.         hasn't been freed, and will re-use it. If the new clip is
  55.         larger, the CLOAD command will free the buffer, then
  56.         reallocate it for the new clip size.
  57.  
  58.         GL will also automatically free everything when it exits.
  59.  
  60.     CHGCOLOR D1,S1,[D2,S2],[D3,S3],...
  61.  
  62.         Copy the value in color register S1 to color register D1, and
  63.         so on for each pair of values.
  64.  
  65.     CLEARSCR
  66.  
  67.         Fills the screen with the current color. The initial current
  68.         color is 0, but it can be changed with the COLOR command.
  69.  
  70.     CLOAD NAME,BUFFER,[TYPE]
  71.  
  72.         Loads clip buffer number given by BUFFER with the picture
  73.         given by NAME. BUFFER should be a number between 1 and 128.
  74.         The NAME search is done as follows: if NAME contains a '.'
  75.         character, then a filename exactly matching NAME must exist.
  76.         Otherwise, GL looks first for NAME.CLP, and if that's not
  77.         found, it looks for NAME.#?.
  78.  
  79.         The optional TYPE is the kind of RAM to allocate for the clip,
  80.         and if present should be either FAST or CHIP. Clips loaded
  81.         into FAST RAM will not be displayed as quickly as those in
  82.         CHIP RAM, but this is sometimes necessary when the amount of
  83.         clip data you want to load exceeds available CHIP RAM. The
  84.         MS-DOS version of this command has a SHIFTFLAG in this field -
  85.         this means nothing on the Amiga. The default TYPE is CHIP.
  86.  
  87.     COLOR REGISTER
  88.  
  89.         Sets the default drawing pen to REGISTER. The initial current
  90.         color is 0.
  91.  
  92.   A CPALETTE BUFFER
  93.  
  94.         Loads the color map from the clip buffer number BUFFER into
  95.         the screen. MS-DOS clips normally don't have a palette, but
  96.         Amiga clips do, and using CPALETTE to set the colors could
  97.         mean that you can get rid of the PAL.PIC that many MS-DOS GL
  98.         files use.
  99.  
  100.   A DAMAGE [OPT]
  101.  
  102.         Controls damage repair in double buffering. Commands that
  103.         draw something set a "damage" rectangle after rendering,
  104.         which covers the area of the screen they've changed. Then
  105.         when a buffer swap is performed, the damage rectangle is
  106.         copied from the visible buffer to the hidden buffer after the
  107.         swap, to keep the buffers in sync.
  108.  
  109.         In some cases, this sort of damage control is redundant. This
  110.         is especially true when the next drawing command uses exactly
  111.         the same area the previous command used. So it would be handy
  112.         to be able to turn it on/off, or even to let the script mark
  113.         damage areas itself.
  114.  
  115.         OPT can be ON, OFF or ALL. ON turns damage repair on (the
  116.         default). OFF turns it off. ALL turns it on, and forces an
  117.         update of the entire screen. If OPT is not given, then the
  118.         state of damage repair is toggled.
  119.  
  120.         Commands like FLY will automatically avoid damage repair when
  121.         they can. For example, FLY with a STEP of 0 doesn't require a
  122.         repair until the end of the command. It's the damage repair
  123.         between commands like CFADE, PFADE and PUTUP that this
  124.         command is aimed at removing.
  125.  
  126.     DATABEGIN LABEL
  127.  
  128.         Sets up pointers for argument indirection to just after
  129.         LABEL. When a "@" is encountered in a command argument list,
  130.         it is replaced with the next available token from the list
  131.         pointed to by a preceding DATABEGIN command. The list of
  132.         tokens is terminated by the end of the file, or by a
  133.         "DATAEND" token.
  134.  
  135.         This is used in conjunction with POSITION to do debanimation.
  136.  
  137.     EXIT
  138.  
  139.         Ends the animation.
  140.  
  141.     FLY STARTX,STARTY,ENDX,ENDY,STEP,DELAY,NUM1,[NUM2],[NUM3],...
  142.  
  143.         Renders clip NUM1 at STARTX,STARTY then adds STEP to STARTX,
  144.         STARTY and renders clip NUM2. Then adds STEP to STARTX,STARTY
  145.         and renders clip NUM3. And so on. After rendering all the
  146.         clips, GL pauses for DELAY 100ths of a second. Then it
  147.         compares the current STARTX,STARTY with ENDX,ENDY, and if
  148.         they are the same, it continues on to the next command.
  149.  
  150.         There can be up to 32 clip numbers following DELAY. In fact,
  151.         there isn't a limit, but MS-DOS files have a limit of 32.
  152.  
  153.         FLY is often used with a STEP of 0, to show a series of clips
  154.         in the same position, as an alternative to using a long
  155.         series of CFADE commands.
  156.  
  157.     GOSUB LABEL
  158.  
  159.         Executes a subroutine at LABEL. A subroutine is terminated by
  160.         the RETURN command. GOSUBs can be nested 10 levels deep.
  161.  
  162.         A label is a line starting with a word followed by a ':'
  163.         character. The GOSUB command should not include the ':' after
  164.         the LABEL.
  165.  
  166.     GOTO LABEL
  167.  
  168.         Transfers execution to LABEL.
  169.  
  170.         A label is a line starting with a word followed by a ':'
  171.         character. The GOTO command should not include the ':' after
  172.         the LABEL.
  173.  
  174.     LOOP
  175.  
  176.         Do the next iteration of the matching MARK command. If all
  177.         the specified iterations have been done, continue with the
  178.         next line.
  179.  
  180.     MARK NUMBER
  181.  
  182.         Set a mark for a matching LOOP command. The number is how
  183.         many iterations of the script between the MARK and the LOOP
  184.         should be performed.
  185.  
  186.         MARK/LOOP pairs can be nested 16 levels deep.
  187.  
  188.     PALETTE BUFFER
  189.  
  190.         Loads the color map from the picture buffer number BUFFER
  191.         into the screen.
  192.  
  193.     PFADE FADE,BUFFER,[SPEED],[DELAY]
  194.  
  195.         Fades a picture to the screen. See FADES below for a list of
  196.         the supported fades. The BUFFER is the picture number to
  197.         fade, and is the same the BUFFER as the PLOAD command.
  198.  
  199.         The SPEED parameter is ignored. The DELAY parameter indicates
  200.         a delay, in 100ths of a second, before the player should
  201.         continue with the next command.
  202.  
  203.         The picture is faded in at 0,0 on the screen. For pictures
  204.         that are smaller than the screen size, the MS-DOS version may
  205.         have expected the picture to get faded in at the bottom-left
  206.         corner.
  207.  
  208.         FADE number 0 is a special case. Instead of fading in a
  209.         picture, the current color (see COLOR) is faded into the
  210.         entire screen. Not all fades support this usage.
  211.  
  212.     PFREE NUM1,[NUM2],[NUM3],...
  213.  
  214.         Free 1 or more picture buffers. The memory allocated for the
  215.         specified buffers will be returned to the system. It's ok if
  216.         a buffer hasn't actually been loaded before calling this
  217.         command - that buffer will just be ignored.
  218.  
  219.         Note that if you will be loading another picture into one of
  220.         these buffers, and that picture is the same size or smaller
  221.         than the current contents, then there isn't much point in
  222.         calling PFREE. The PLOAD command will detect that the buffer
  223.         space hasn't been freed, and will re-use it. If the new
  224.         picture is larger, the PLOAD command will free the buffer,
  225.         then reallocate it for the new picture size.
  226.  
  227.         GL will also automatically free everything when it exits.
  228.  
  229.     PLOAD NAME,BUFFER,[TYPE]
  230.  
  231.         Loads picture buffer number given by BUFFER with the picture
  232.         given by NAME. BUFFER should be a number between 1 and 16.
  233.         The NAME search is done as follows: if NAME contains a '.'
  234.         character, then a filename exactly matching NAME must exist.
  235.         Otherwise, GL looks first for NAME.PIC, and if that's not
  236.         found, it looks for NAME.#?.
  237.  
  238.         The optional TYPE is the kind of RAM to allocate for the
  239.         picture, and if present should be either FAST or CHIP.
  240.         Pictures loaded into FAST RAM will not be displayed as quickly
  241.         as those in CHIP RAM, but this is sometimes necessary when the
  242.         amount of data you want to load exceeds available CHIP RAM.
  243.         The default value is CHIP.
  244.  
  245.     POSITION BUUFER,X,Y
  246.  
  247.         Sets the top-left coordinates for picture buffer BUFFER to X,
  248.         Y. This is usually used to scroll pictures larger than the
  249.         screen, in a process called "debanimation".
  250.  
  251.         For example, given a picture that is 320x500 pixels in size,
  252.         you can display the region from (0,200)-(319,399) on a
  253.         320x200 screen by using the command POSITION 1,0,200.
  254.  
  255.         This command only affects PFADE 0.
  256.  
  257.     PUTUP X,Y,[BUFFER],[DELAY]
  258.  
  259.         This is synonymous with CFADE 0,X,Y,BUFFER,0,DELAY. The
  260.         default BUFFER number is 1, and the default DELAY is 0. The
  261.         semantics of the MS-DOS version of this command are slightly
  262.         different, but that applies to things have haven't been
  263.         implemented yet by this player.
  264.  
  265.     RETURN
  266.  
  267.         Ends a subroutine.
  268.  
  269.     TILE BUFFER
  270.  
  271.         Tiles the clip buffer BUFFER on the screen. Starting at the
  272.         top-left of the screen, the clip is repeated to the right and
  273.         down.
  274.  
  275.     VIDEO [MODE1],...,[MODEN],[WNNN],[HNNN],[DNNN]
  276.  
  277.         Selects a display mode and dimensions. The animation screen
  278.         is opened when this command is executed.
  279.  
  280.         MODE can be either HAM, HIRES or LACE. More than one mode
  281.         word may be specified. If HAM and HIRES are not used, then
  282.         the default mode is LORES.
  283.  
  284.         WNNN gives the desired width in pixels. HNNN is the height,
  285.         and DNNN is the depth in bitplanes.
  286.  
  287.     WAITKEY [DELAY],[LABEL]
  288.  
  289.         Pauses until the user hits a key. If DELAY is given, then the
  290.         pause will timeout after DELAY 100ths of a second. If a
  291.         timeout occurs and LABEL is present, execution is tranferred
  292.         to LABEL.
  293.  
  294.     WINDOW X0,Y0,X1,Y1
  295.  
  296.         Specifies a clipping window. Areas outside this window will
  297.         not be affected by most rendering commands. The only
  298.         exception at this time is the BOX command.
  299.  
  300.  
  301.     FADES
  302.  
  303.     At least 25 fades may referenced by the CFADE and PFADE commands.
  304.     Those marked with an '*' are implemented. If an unimplemented
  305.     fade is requested, fade 0 is used.
  306.  
  307.     *   0 Quick snap wipe
  308.     *   1 Horizontal left to right wipe
  309.     *   2 Horizontal right to left wipe
  310.     *   3 Horizontal edge to center wipe
  311.     *   4 Horizontal center to edge wipe
  312.     *   5 Horizontal 1 pass filter wipe - both sides simultaneously
  313.     *   6 Horizontal 2 pass filter wipe - from left, then from right
  314.         7 Horizontal halves wipe - left to right, then right to left
  315.         8 Horizontal halves wipe - left and right simultaneously
  316.     *   9 Vertical top to bottom wipe
  317.     *  10 Vertical bottom to top wipe
  318.        11 Vertical edge to center wipe
  319.        12 Vertical center to edge wipe
  320.        13 Vertical filter wipe, top and bottom simultaneously
  321.        14 Vertical halves wipe, top and bottom simultaneously
  322.        15 Vertical halves wipe, left down, right up
  323.        16 Vertical quarters wipe
  324.        17 Vertical fingers wipe
  325.        18 Vertical fingers/filter combination wipe
  326.     *  19 Slither from top to bottom
  327.     *  20 Sparkle fade (random)
  328.        21 Diagonal wipe
  329.        22 Aperature dissolve - edge to center
  330.        23 Aperature dissolve - center to edge
  331.        24 Clockwise clock dissolve
  332.        25 Double slant dissolve
  333.